package cn.dakaqi.entities;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by chunyang on 2016/4/22.
 */
@Cacheable
@Entity
@Table(name = "U_GROUP_RECRUIT")
public class GroupRecruit extends IdEntity
{
    private Group group;
    private Volunteer volunteer;
    private String title;
    private String demo;
    private Date stopApplyTime;
    private int needs;
    private String job;
    private String skill;
    private String serviceField;
    private String img;
    private Date createTime;
    private int top;//是否被置顶
    private int applys;//报名人数
    private String question;//问题列表
    private int status;//是否已结束 1进行中 2 已结束
    private int browses;//浏览量

    public GroupRecruit()
    {
    }

    public GroupRecruit(Long id)
    {
        this.id = id;
    }

    public int getBrowses()
    {
        return browses;
    }

    public void setBrowses(int browses)
    {
        this.browses = browses;
    }

    public int getStatus()
    {
        return status;
    }

    public void setStatus(int status)
    {
        this.status = status;
    }
    @ManyToOne
    @JoinColumn(name = "VOLUNTEER_ID")
    @JsonIgnore
    public Volunteer getVolunteer()
    {
        return volunteer;
    }

    public void setVolunteer(Volunteer volunteer)
    {
        this.volunteer = volunteer;
    }

    @ManyToOne
    @JoinColumn(name = "GROUP_ID")
    @JsonIgnore
    public Group getGroup()
    {
        return group;
    }

    public void setGroup(Group group)
    {
        this.group = group;
    }

    public String getTitle()
    {
        return title;
    }

    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getDemo()
    {
        return demo;
    }

    public void setDemo(String demo)
    {
        this.demo = demo;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getStopApplyTime()
    {
        return stopApplyTime;
    }

    public void setStopApplyTime(Date stopApplyTime)
    {
        this.stopApplyTime = stopApplyTime;
    }

    public int getNeeds()
    {
        return needs;
    }

    public void setNeeds(int needs)
    {
        this.needs = needs;
    }

    public String getJob()
    {
        return job;
    }

    public void setJob(String job)
    {
        this.job = job;
    }

    public String getSkill()
    {
        return skill;
    }

    public void setSkill(String skill)
    {
        this.skill = skill;
    }

    public String getServiceField()
    {
        return serviceField;
    }

    public void setServiceField(String serviceField)
    {
        this.serviceField = serviceField;
    }

    public String getImg()
    {
        return img;
    }

    public void setImg(String img)
    {
        this.img = img;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCreateTime()
    {
        return createTime;
    }

    public void setCreateTime(Date createTime)
    {
        this.createTime = createTime;
    }

    public int getTop()
    {
        return top;
    }

    public void setTop(int top)
    {
        this.top = top;
    }

    public int getApplys()
    {
        return applys;
    }

    public void setApplys(int applys)
    {
        this.applys = applys;
    }

    public String getQuestion()
    {
        return question;
    }

    public void setQuestion(String question)
    {
        this.question = question;
    }

}
